/*************************************************
* Title：TinyToolKit
* Author：Opportunity 
* Describe：TinyToolKit配置资源对象
* CreateTime：2020-04-05 18:52:29
* Version：1.0
* Modify Recorder：
*************************************************/

using System;
using UnityEngine;

namespace TinyToolKit
{
    //[CreateAssetMenu(fileName = "TinyToolSetting",menuName = "TinyAsset/TinyTool Setting",order = 1)]
    public class TinyToolSettingAsset : ScriptableObject
    {
        public bool persist = true;
        
        [Header("Sound")]
        public bool ignoreDuplicateMusic = true;
        public bool ignoreDuplicateSounds = true;
        public bool ignoreDuplicateUiSounds = true;
        [Range(0, 1)] public float globalVolume = 1;
        [Range(0, 1)] public float globalMusicVolume = 1;  
        [Range(0, 1)] public float globalSoundsVolume = 1;
        [Range(0, 1)] public float globalUISoundsVolume = 1;
         
        [Header("UI Form")]
        public UIFormPathType uiFormLocalizationPathType = UIFormPathType.Resources;
        public string uiFormsConfigResPath = "UIFormConfigTable";      
        public bool clearAllFormsOnSceneChanged = true;   
        
        [Header("Localization")]
        public LocalizationPathType localizationPathType = LocalizationPathType.Resources;
        [SerializeField] public LanLocalization[] localizationPaths; 
        
        [Header("AssetBundle")]   
        public bool isEditorMode;
    }

    [Serializable]
    public class LanLocalization
    {
        public Language lan;
        public string path;
    }
    
    public enum LocalizationPathType 
    {
        Resources,
        StreamingAssets,
        Custom
    }

    public enum UIFormPathType 
    {
        Resources,
        Custom
    }
}
